ThinkPHP5


think\response\Redirect
library\think\response\Redirect.php at line 19

Class Redirect

Response
└─Redirect

public class Redirect
extends Response


Constructor Summary
void

__construct(str data, int code, array header, array options)

架构函数

Method Summary
protected mixed

output(mixed data)

处理数据

$this

with(string|array name, mixed value)

重定向传值(通过Session)

string

getTargetUrl()

获取跳转地址

void

params(mixed params)

void

remember()

记住当前url后跳转

void

restore()

跳转到上次记住的url

Methods inherited from think\Response
__construct, cacheControl, code, content, contentType, create, data, eTag, expires, getCode, getContent, getData, getHeader, header, lastModified, options, output, send

Constructor Detail

library\think\response\Redirect.php at line 27

__construct

public void __construct(str data, int code, array header, array options)

架构函数

Parameters:
data - 输出数据
options - 输出参数

Method Detail

library\think\response\Redirect.php at line 39

output

protected mixed output(mixed data)

处理数据

Parameters:
data - 要处理的数据

library\think\response\Redirect.php at line 52

with

public $this with(string|array name, mixed value)

重定向传值(通过Session)

Parameters:
name - 变量名或者数组
value - 值

library\think\response\Redirect.php at line 68

getTargetUrl

public string getTargetUrl()

获取跳转地址


library\think\response\Redirect.php at line 73

params

public void params(mixed params)

library\think\response\Redirect.php at line 82

remember

public void remember()

记住当前url后跳转


library\think\response\Redirect.php at line 90

restore

public void restore()

跳转到上次记住的url


ThinkPHP5